<?php

namespace App\Http\Controllers\Home;

use DB;
use Illuminate\Http\Request;
use EasyWeChat\Foundation\Application;
use App\Http\Controllers\Controller;
use App\Http\Models\Message;


class MessageController extends Controller {

    public function store(Request $request){
        $message = new Message();
        $message->name = $request->input("name");
        $message->mobile = $request->input("mobile");
        $message->address = $request->input("address");
        $message->quota = $request->input("quota");
        $message->visit = $request->input("visit");
        $message->content = $request->input("content");
        $message->save();
        return response()->json(["state"=>'ok',"message"=>"留言成功"]);
    }

}
